#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef double db;

#define in read()
#define pii pair<int,int>
#define fi first
#define se second
#define FILE(x) freopen(x".in","r",stdin);\
	freopen(x".out","w",stdout);
#define pb push_back

int read(){
	int x = 0,sgn = 1;char ch = getchar();
	for(;!isdigit(ch);ch = getchar()) if(ch == '-') sgn = -1;
	for(;isdigit(ch);ch = getchar()) x = (x<<1)+(x<<3)+(ch^48);
	return x*sgn;
}

const int N = 1010;

db pro[N],g[N][N],f[N];
int n;
bool vis[N];

int main (){
#ifndef ONLINE_JUDGE
	freopen("1.in","r",stdin);
#endif
	n = in; for(int i = 1;i <= n;i++) for(int j = 1;j <= n;j++) g[i][j] = 1.0 * in / 100.0;
	vis[n] = 1; f[n] = 0; if(n == 1) return puts("0.000"),0;
	for(int i = 1;i < n;i++) pro[i] = 1 - g[i][n],f[i] = 1;
	for(int i = 1;i <= n;i++){
		int pos = 0; db mn = 1e18;
		for(int j = 1;j <= n;j++)
			if(!vis[j] && f[j] / (1 - pro[j]) < mn) mn = f[j] / (1 - pro[j]),pos = j;
		if(pos == 1) return printf("%.10lf",f[1] / (1 - pro[1])),0;
		vis[pos] = 1;
		for(int j = 1;j <= n;j++)
			if(!vis[j]) f[j] += f[pos] / (1 - pro[pos]) * pro[j] * g[j][pos],pro[j] *= 1 - g[j][pos];
	}
	return 0;
}

